#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int gcd(int, int);

int main()
{
	int m,n;
	printf("in m n:");
	scanf("%d %d", &m, &n);
	if(m < n)
	{
		int tem = m;
		m = n;
		n = tem;
	}
	int re;
	re = gcd(m, n);
	printf("GCD:%d\n", re);
	return 0;
}

int gcd(int m, int n)
{
	int re = 0;
	int mod = m % n;
	if(mod == 0)re = n;
	else re = gcd(n, mod);
	return re;
}
